package com.weaver.drools.common.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
/**
 *  @application name: 
 *  @author: zhouxinlei 
 *  @time：2018年10月8日
 *  @version：ver 1.1
 */
@Entity
@Table(name = "PERSON")
public class Person implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(generator = "snowFlakeId")
	@GenericGenerator(name = "snowFlakeId", strategy = "com.weaver.drools.common.businesskey.SnowFlakeId")
    @Column(name = "person_id", nullable = false, length = 20)
	private Long id;
	@Column(name = "person_name", nullable = false, length = 60)
    private String name;
	@Column(name = "person_age", nullable = false, length = 20)
    private Long age;
	@Column(name = "person_desc", nullable = false, length = 60)
    private String desc;

    public Person() {
    }

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getAge() {
		return age;
	}

	public void setAge(Long age) {
		this.age = age;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	@Override
	public String toString() {
		return "Person [id=" + id + ", name=" + name + ", age=" + age + ", desc=" + desc + "]";
	}

}
